package com.bw.user.proxy.dongtai1;

import java.lang.reflect.Proxy;

/**
 * @ClassName Person
 * @Author Hao_YunKai
 * @Date 2022/4/9 9:30
 */
public interface Person {
    void test();
}

class Entrance {
    public static void main(String[] args) {
        Student student = new Student();
        A a = new A();
        a.object = student;
        User person = (User) Proxy.newProxyInstance(student.getClass().getClassLoader(), student.getClass().getInterfaces(), a);
        person.write();
    }
}